package lambda.test;

public class LambdaTest1 {
    public static void main(String[] args) {

        useShowHandler(() ->
            System.out.println("这是Lambda表达式的的show方法")
        );

        useShowHandler(new ShowHandler() {
            @Override
            public void show() {
                System.out.println("匿名内部类中的show方法");
            }
        });

    }

    public static void useShowHandler(ShowHandler showHandler){
        showHandler.show();
    }

}

interface ShowHandler{
    void show();
}
